package com.yonyou.brigade.order_center.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.service.IService;
import com.yonyou.brigade.order_center.model.BriCarOrder;
import com.yonyou.brigade.order_center.model.CnvCarOrderDO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jiangzhf@yonyou.com
 * @since 2019-01-24
 */
public interface IBriCarOrderService extends IService<BriCarOrder> {
    public List<BriCarOrder> getOrdersByRelateYBZId(List<String> ybzIds);

    Map getBriCarOrderDTOs(Map params);

    List<CnvCarOrderDO> getCnvCarOrderDos(Map<String, String> params, Date beginDate, Date endDate);

    void updateIsNoteByOrderId(int orderId);

    List<BriCarOrder> getCarOrdersByTimeRange(String tenantId, Date begin, Date end);

    JSONObject getCarOrderJson(JSONObject params);

    /**
     * 获取用车订单详情
     * @param tenant
     * @param orderNo
     * @return
     */
    BriCarOrder getCarOrderJson(String tenant, String orderNo);

    CnvCarOrderDO getBriCarOrderByOrderNo(String orderNo);

    /**
     * 查询原单或退改单
     * @param orderNo
     * @param parentNo
     * @return
     */
    List<CnvCarOrderDO> getRelationOrders(String orderNo, String parentNo);

    JSONArray getCarOrders(String userId, String bxState, String beginDate, String endDate, String tenant, Map<String, List<Map<String, String>>> canBeSeen);

    JSONArray getCarOrders(String tenant, String orderNo);

    List<BriCarOrder> getCarOrdersByBxState(String userId, String bxState, String beginDate, String endDate, String tenant, Map<String, List<Map<String, String>>> canBeSeen);
}
